<ion-header>
    <ion-toolbar content-page>
        <ion-buttons start>
            <button ion-button icon-only (click)="backButtonClick($event)">
                <i class="toolbar-back"></i>
            </button>
        </ion-buttons>
        <ion-title>
            保单
        </ion-title>
        <ion-buttons end>
            <button ion-button icon-only adpmenutoggle>
                <i class="toolbar-menu"></i>
            </button>
        </ion-buttons>
    </ion-toolbar>
</ion-header>


<!--<ion-content class="content-body" (ionScroll)="scrolling()" (ionScrollStart)="scrollStart($event)" (ionScrollEnd)="scrollEnd($event)">-->
    <!--<ion-refresher (ionRefresh)="pullDownRefresh($event)" [pullMax]="800">-->
        <!--<ion-refresher-content></ion-refresher-content>-->
    <!--</ion-refresher>-->

    <!--<div *ngIf="(!policyList || policyList.length === 0) && isLoaded" class="no-data">-->
        <!--<div class="no-data-img"><img src="./assets/images/common/icon_nodata.png"></div>-->
        <!--<div class="no-data-txt">没有相关数据</div>-->
    <!--</div>-->

    <!--<ion-list [virtualScroll]="policyList" [approxItemHeight]="'65px'" style="margin-left: 5.55vw;margin-top:5.55vw;min-height:100%">-->
        <!--<div class="policy-item" *virtualItem="let data" (click)="goToDetail(data.policyID, data.orphanType, data.agentCode)">-->
            <!--&lt;!&ndash;<div class="item-title" (click)="goToDetail(data.policyID)">&ndash;&gt;-->
            <!--<div class="item-title">-->
                <!--<div class="policy-num">-->
                    <!--保单号：{{data.policyID}}-->
                <!--</div>-->
                <!--<div class="policy-status">-->
                    <!--{{data.policyStatus}}-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="item-content">-->
                <!--<div class="main-risk">主险名称：{{data.mainRisk}}</div>-->
                <!--&lt;!&ndash;<div class="policy-holder" (click)="goToHolderDetail(data.policyHolderId)">&ndash;&gt;-->
                <!--<div class="policy-holder">-->
                    <!--<span>投保人：{{data.policyHolder}}</span>-->
                    <!--<i [class]="getSex(data.sexPolicyHolder)"></i>-->
                    <!--<span>{{data.agePolicyHolder}}岁</span>-->
                <!--</div>-->
                <!--&lt;!&ndash;<div class="recognizee" (click)="goToInsuredDetail(data.recognizeeId)">&ndash;&gt;-->
                <!--<div class="recognizee">-->
                    <!--<span>被保险人：{{data.recognizee}}</span>-->
                    <!--<i [class]="getSex(data.sexRecognizee)"></i>-->
                    <!--<span>{{data.ageRecognizee}}岁</span>-->
                <!--</div>-->
                <!--<div class="value-date">保单生效日：{{moment(data.policyValueDate*1000).format('YYYY/MM/DD')}}</div>-->
                <!--<div class="payment">下期应缴保费日：{{moment(data.payment*1000).format('YYYY/MM/DD')}}</div>-->
            <!--</div>-->
        <!--</div>-->
    <!--</ion-list>-->

    <!--<div class="is-arrival-bottom" [ngClass]="{'bottom':isArriveBottom}">-->
        <!--到底了-->
    <!--</div>-->

    <!--<ion-fab bottom right>-->
        <!--<button ion-fab (click)="goUp()" color="light">-->
            <!--<img class="go-up-icon" src="./assets/images/client/client-list/icon_top.png" alt="">-->
        <!--</button>-->
    <!--</ion-fab>-->

<!--</ion-content>-->

<ion-content class="container" (ionScroll)="scrolling()" (ionScrollStart)="scrollStart($event)" (ionScrollEnd)="scrollEnd($event)">
    <ion-refresher (ionRefresh)="pullDownRefresh($event)" [pullMax]="800">
        <ion-refresher-content></ion-refresher-content>
    </ion-refresher>

    <div *ngIf="(!policyList || policyList.length === 0) && isLoaded" class="no-data">
        <div class="no-data-img"><img src="./assets/images/common/icon_nodata.png"></div>
        <div class="no-data-txt">没有相关数据</div>
    </div>

    <div class="top-dis"></div>

    <ion-list [virtualScroll]="policyList" [approxItemHeight]="'220px'">
        <div class="content-item" *virtualItem="let data"  (click)="goToDetail(data.policyID,data.policyPayToDate,data.policyStatus,data.policyStatusCode,data.orphanType, data.agentCode)">
            <div class="item-bar">
                <span class="bar-left">保单号：{{data.policyID}}</span>
                <span class="bar-right">{{data.policyStatus}}</span>
            </div>
            <div class="item-ctt">
                <div class="flex-box">
                    <span class="ctt-left">主险名称</span>
                    <span class="ctt-right">{{data.mainRisk}}</span>
                </div>
                <div>
                    <span class="ctt-left">投保人</span>
                    <span class="ctt-right">
                        <span>{{data.policyHolder}}</span>
                        <i [class]="getSex(data.sexPolicyHolder)"></i>
                        <span class="age">{{data.agePolicyHolder}}岁</span>
                    </span>
                </div>
                <div>
                    <span class="ctt-left">被保险人</span>
                    <span class="ctt-right">
                        <span>{{data.recognizee}}</span>
                        <i [class]="getSex(data.sexRecognizee)"></i>
                        <span class="age">{{data.ageRecognizee}}岁</span>
                    </span>
                </div>
                <div>
                    <span class="ctt-left">保单生效日</span>
                    <span class="ctt-right">{{moment(data.policyValueDate*1000).format('YYYY/MM/DD')}}</span>
                </div>
                <div *ngIf="data.policyStatus != '保费已缴清' && data.policyStatus != '豁免保费' && data.policyStatus != '减额缴清'">
                    <span class="ctt-left">下期应缴保费日</span>
                    <span class="ctt-right">{{moment(data.payment*1000).format('YYYY/MM/DD')}}</span>
                </div>
            </div>
        </div>
    </ion-list>

    <div class="is-arrival-bottom" [ngClass]="{'bottom':isArriveBottom}">
        到底了
    </div>

    <ion-fab bottom right *ngIf="policyList && policyList.length > 0" class="go-up">
        <button ion-fab (click)="goUp()" color="light">
            <img class="go-up-icon" src="./assets/images/client/client-list/icon_top.png" alt="">
        </button>
    </ion-fab>
</ion-content>
